package com.my.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.my.entity.TestPaper;
import com.my.mapper.TestPaperMapper;
import com.my.service.TestPaperService;
import org.springframework.stereotype.Service;

@Service("testPaperService")
public class TestPaperServiceImpl extends ServiceImpl<TestPaperMapper, TestPaper> implements TestPaperService {
    
    @Override
    public IPage<TestPaper> getPage(IPage<TestPaper> page, TestPaper t) {
        return baseMapper.getPage(page, t);
    }

    @Override
    public boolean addStudentTestPaper(Long testPaperId) {
        return baseMapper.addStudentTestPaper(testPaperId) > 0;
    }

    @Override
    public IPage<TestPaper> getTestPaperByStudentId(IPage<TestPaper> page, Long studentId) {
        return baseMapper.getTestPaperByStudentId(page, studentId);
    }

}
